<html>
<head xml:space="default">
    <meta name="Access-Control-Request-Method"
          content="GET,POST,PUT,DELETE,OPTIONS">
    <meta name="Access-Control-Allow-Origin"
          content="*">
    <meta name="X-Requested-With"
          content="XMLHttpRequest">
    <meta name="Content-Type"
          content="text/xml;charset utf-8">
    <meta name="Access-Control-Requesst-Header"
          content="X-Custom-Header">
    <script type="text/javascript" src="soapclient.js"></script>
    <!-- 此处略去此理没用到的js -->
    <script type="text/javascript">
        var url = "http://localhost:8080/test/user";

        function GetSoapResponse() {
            var pl = new SOAPClientParameters();
            pl.add('411001');
            SOAPClient.invoke(url, "getUser", pl, true, GetSoapResponse_callBack);
        }

        function GetSoapResponse_callBack(r, soapResponse) {
            if (soapResponse.xml)    // IE
                alert(soapResponse.xml);
            else    // MOZ
                alert((new XMLSerializer()).serializeToString(soapResponse));
        }
    </script>
</head>
<body>
<div>
    <button onclick="GetSoapResponse();">点击</button>
</div>
</body>
</html>